﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.StampApprove
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.StampApprove;

    public class map_StampApproveFlow : EntityMapping<StampApproveFlow>
    {
        public map_StampApproveFlow()
        {
            ManyToOne(x => x.Attachment_1, map =>
            {
                map.Column("AttId1");
            });

            ManyToOne(x => x.Attachment_2, map =>
            {
                map.Column("AttId2");
            });

            ManyToOne(x => x.Attachment_zjcs, map =>
            {
                map.Column("AttId_zjcs");
            });


            ManyToOne(x => x.Attachment_fzsp, map =>
            {
                map.Column("AttId_fzsp");
            });

            Property(x => x.AttachmentType, map =>
            {
                map.Length(100);
            });

            Property(x => x.Describe, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SerialCode, map =>
            {
                map.Length(10);
            });

            Property(x => x.PublishDate, map =>
            {
                map.Length(50);
            });

            Property(x => x.PublishFlag, map =>
            {

            });

            Property(x => x.AnnounceIsHot, map =>
            {

            });

            Property(x => x.AnnounceIsNew, map =>
            {

            });

            Property(x => x.AnnounceIsShow, map =>
            {

            });

            Property(x => x.AnnounceTitle, map =>
            {
                map.Length(400);
            });

            Property(x => x.AnnounceId, map =>
            {
                map.Length(40);
            });


            Property(x => x.SP_Content_BMJL, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Content_FZJL, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Content_GZGL, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Content_ZJY, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Content_ZGSC, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Content_ZGSP, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SP_Score, map =>
            {

            });

            Property(x => x.SPDate, map =>
            {

            });

            Property(x => x.SPDescribe, map =>
            {
                map.Length(100000000);
            });

            Property(x => x.SPFlag, map =>
            {

            });

            Property(x => x.StampCount, map =>
            {

            });

            Property(x => x.StampType, map =>
            {
                map.Length(100);
            });

            Property(x => x.StampDescribe, map =>
            {
                map.Length(800000000);
            });

            Property(x => x.DivisionDescribe, map =>
            {
                map.Length(800000000);
            });

            ManyToOne(x => x.CreatorUser, map =>
            {
                map.Column("CreateUserId");
            });

            ManyToOne(x => x.Project, map =>
            {
                map.Column("ProjectId");
            });

            Bag(x => x.EvalDeductions, map =>
            {
                map.Key(keyMapper => keyMapper.Column("StampApproveId"));
            }, rel => rel.OneToMany());
        }
    }
}
